//
//  LXSelectNumberItem.m
//  TestDemo
//
//  Created by xiao.zhao@lachesis-mh.com on 16/2/23.
//  Copyright © 2016年 xiao.zhao@lachesis-mh.com. All rights reserved.
//

#import "LXSelectNumberItem.h"

@implementation LXSelectNumberItem

+(LXSelectNumberItem *)itemWithImage:(UIImage *)image selectedImage:(UIImage *)selectedImage text:(NSString *)text unitNum:(CGFloat)num unitString:(NSString *)unitstring
{
    LXSelectNumberItem *item = [[LXSelectNumberItem alloc]init];
    item.image = image;
    item.selectedImage = selectedImage;
    item.text = text;
    item.unitAfter = unitstring;
    item.unit = num;
    return item;
}

-(BOOL)isEqual:(LXSelectNumberItem *)item
{
    if([item.image isEqual:self.image] &&
       [item.selectedImage isEqual:self.selectedImage] &&
       [item.text isEqual:self.text] &&
       item.number == self.number)
    {
        return YES;
    }
    
    return NO;
}

@end
